package main

import (
	"fmt"
	"time"
)

func main() {
	// 指定格式输出时间
	now := time.Now()
	fmt.Println(now.Format("2006-01-02 15:04:05"))

	// Tick心跳
	ticker := time.Tick(2 * time.Second)
	for t := range ticker {
		fmt.Println(t)
	}

}
